#pragma once

namespace CO { namespace SpiFoundation { namespace RoomFW {

class SimpleCriticalSectionTestSuite : public Test::Suite
{
public:
	SimpleCriticalSectionTestSuite();
	
private:
	void wait(void);
	static const DWORD MaxWait = 2000; // 2 seconds
	typedef std::pair<CO::SpiFoundation::RoomFW::SimpleEvent, CO::SpiFoundation::RoomFW::SimpleEvent> EventPair;
	typedef std::pair<SimpleCriticalSectionTestSuite*, EventPair*> ThreadArg;
	static void ThreadProc(void* arg);
	void waitProc(EventPair* pair);

	CO::SpiFoundation::RoomFW::SimpleCriticalSection cs_;
	int x_;
};

}}}
